import {baseUrl} from "@/config/env";

export default () => {
    return {
        submitText: '修改',
        size: 'small',
        labelWidth: 80,
        index: true,
        menuAlign: 'center',
        menuPosition: "right",
        column: [
            {
                label: '父级id',
                span: 24,
                prop: 'dictionaryId',
                addDisplay: false,
                editDisplay: false,
                showColumn: false,
            },
            {
                label: '名称',
                span: 24,
                prop: 'name',
                rules: [{
                    required: true,
                    trigger: "blur"
                }]
            },
            {
                label: '编码',
                span: 24,
                prop: 'code',
                addDisplay: true,
                editDisplay: true,
                rules: [{
                    required: true,
                    trigger: "blur"
                }]
            }, {
                label: '字典值',
                span: 24,
                prop: 'dictionaryValue',
                type: 'textarea',
                maxlength: 255,
                showWordLimit: true,
            },
            {
                label: '父级字典',
                span: 24,
                prop: 'parentId',
                addDisplay: true,
                editDisplay: true,
                showColumn: true,
                type: "tree",
                dicUrl: baseUrl + "/start/sysDictionaryItem/listByDictionaryDictionaryId",
                dicQuery:{
                    dictionaryId:null
                },
                props: {
                    label: 'name',
                    value: 'id',
                },
                option:{
                    filterText:"搜索关键字",
                }
            },
             {
                label: '是否有效',
                span: 24,
                prop: 'isEnable',
                type: 'select',
                dicData: [
                    {label: "无效", value: 0},
                    {label: "有效", value: 1},
                ]
            },
            {
                label: '序号',
                span: 24,
                prop: 'sort',
                type: 'number',

            },

        ]
    }
}
